import request from "@/apis/fetch";

/**
 * 登录
 * @param {Login} data
 */
export const login = (data) => {
  return request({
    method: "post",
    url: "/api/v1/login",
    data,
  });
};


/**
 * 退出登录
 */
export const logout = data => {
    return request({
      method: 'delete',
      url: '/api/v1/login',
      data
    })
  }

  
  /**
 * 修改密码并登录
 * @param {ChangePw} data
 */
export const changePw = (data) => {
  return request({
    // name: '修改密码并登录',
    method: 'post',
    url: '/api/v1/login/pw',
    verifyToken: false,
    data
  })
}